import { DeviceType, PointerInput } from "@babylonjs/core/DeviceInput/InputDevices/deviceEnums";
import { DeviceSource } from "@babylonjs/core/DeviceInput/InputDevices/deviceSource";
import { InputKeyStatus } from '../input-key-status';
import { DeviceInputKey } from "../device-information";


/**
 * @internal
 * 生成触摸屏预设
 * @param device 设备源
 * @returns 触摸屏预设
 */
const TouchPreset = (device: DeviceSource<DeviceType.Touch>) => {
    return {
        BrowserBack: new InputKeyStatus(DeviceInputKey.pointerBrowserBack, PointerInput.BrowserBack, device),
        BrowserForward: new InputKeyStatus(DeviceInputKey.pointerBrowserForward, PointerInput.BrowserForward, device),
        Horizontal: new InputKeyStatus(DeviceInputKey.pointerHorizontal, PointerInput.Horizontal, device),
        LeftClick: new InputKeyStatus(DeviceInputKey.pointerLeftClick, PointerInput.LeftClick, device),
        MiddleClick: new InputKeyStatus(DeviceInputKey.pointerMiddleClick, PointerInput.MiddleClick, device),
        RightClick: new InputKeyStatus(DeviceInputKey.pointerRightClick, PointerInput.RightClick, device),
        Vertical: new InputKeyStatus(DeviceInputKey.pointerVertical, PointerInput.Vertical, device),
    };
};


export { TouchPreset };